function addAddress() {
    window.location.href = appServer + '/selfGet/address/add.htm';
}

function edit(id) {
    window.location.href = appServer + '/selfGet/address/edit.htm?addressId='+id;
}

function del(id) {
    if (confirm("确认删除该地址？")){
        $.ajax({
            url: appServer + "/selfGet/address/del.json",
            type: "POST",
            data: {"addressId":id},
            success: function(res){
                if(res.code == 0){
                    alert(res.msg);
                    window.location.reload();
                }
            },
            error: function(res){
                alert(res.msg);
            }
        });
    }
}